package com.huzz.mapper;

import com.huzz.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 描述
 *
 * @author Huzz
 * @create 2022-08-18 12:10
 */
@Mapper
public interface RoleMapper {

    //根据用户编号查询角色列表
    @Select("select * from `sys_role` where id in (" +
            "  select rid from `sys_user_role` where uid = #{uid}" +
            ")")
    List<SysRole> findByUid(Integer uid);
}
